/* *
 * @program: LivePublisher
 *
 * @description: ${description}
 *
 * @author: 909845
 *
 * @create: 2019-03-28 15:49
***/

#ifndef LIVEPUBLISHER_MEDIAREMUX_H
#define LIVEPUBLISHER_MEDIAREMUX_H


#include "../../Include/libLivePublisher.h"
#include "../Media/IRemuxInterface.h"

class CMediaRemux : public IMediaRemux
{
public:
    CMediaRemux(const char *pStreamID, eLivePublisherStreamType eType);

    virtual ~CMediaRemux();

public:// IMediaRemux
    virtual bool Initialize(bool bHaveAudio, void *pContext, MediaRemuxCb callback) override;

    virtual void PushH264(const char *pData, int nLen, unsigned int uTimestamp) override;

    virtual void PushAac(const char *pData, int nLen, unsigned int uTimestamp) override;

    virtual void Release() override;

private:
    string                                  m_strStreamID;

    shared_ptr<IRemuxInterface>             m_spRemux = nullptr;
};


#endif //LIVEPUBLISHER_MEDIAREMUX_H
